﻿using ALEXBlog.Helper;
using Microsoft.AspNetCore.Mvc;
using System;

namespace ALEXBlog.Controller
{
    [Route("api/[Controller]")]
    [ApiController]
    public class TokenController : ControllerBase
    {
        [HttpGet]
        public IActionResult GetToken()
        {
            return Ok(
                new
                {
                    JwtToken = "Bearer " + new TokenHelper().TakeToken(new Entity.TokenModel() { Role = Role.Users.ToString(), Id = Guid.NewGuid() })
                });
        }

    }
}
